﻿@model Sprint1.Models.InstructorLoginModel

@{
    ViewBag.Title = "Login";
}

<h2>Login</h2>
@using (Html.BeginForm("Login", "Instructor", new { ReturnUrl = Request.QueryString["ReturnUrl"] }, FormMethod.Post))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
    if (ViewBag.message != null)
    {
        <div style="border:1px solid red">
            @ViewBag.message
        </div>
    }
    <table>
        <tr>
            <td>@Html.LabelFor(inst => inst.Email)</td>
            <td>@Html.TextBoxFor(inst => inst.Email)</td>
            <td>@Html.ValidationMessageFor(inst => inst.Email)</td>
        </tr>
        <tr>
            <td>@Html.LabelFor(inst => inst.Password)</td>
            <td>@Html.PasswordFor(inst => inst.Password)</td>
            <td>@Html.ValidationMessageFor(inst => inst.Password)</td>
        </tr>
        <tr>
            <td>
                <input type="submit" value="Login" />
            </td>
        </tr>
    </table>
}
